package com.hxy.pet.controller;

import com.hxy.pet.domain.PetType;
import com.hxy.pet.service.IPetTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/**
 * 宠物类型Controller
 */
@Api(tags = "宠物类型接口",description = "宠物类型接口详细描述")
@RestController
@RequestMapping("/petType")
public class PetTypeController {
    @Autowired
    private IPetTypeService petTypeService;

    /**
     * 获取所有对象：get
     * @return
     */
    @ApiOperation(value = "查询所有",notes = "不需参数")
    @GetMapping
    public List<PetType> findAll(){
        return petTypeService.findAll();
    }
}
